package PTA2.ti41;

import java.util.Scanner;

/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n=scanner.nextInt();
        if(n==1){
            System.out.println(1);
        } else if (n==2) {
            System.out.println(2);
        }
        else {
            long a=1,b=2,c=0;
            for (int i = 3; i <=n; i++) {
                c=a+b;
                a=b;
                b=c;
            }
            System.out.println(c);
        }

        scanner.close();
    }
}
